f48b4c5f7b54448cffb6df6d0b50a717e3b88171,portlets/opensocial-portlet/docroot/WEB-INF/src/com/liferay/opensocial/shindig/service/LiferayMediaItemService.java,LiferayMediaItemService,doUpdateMediaItem,#UserId#String#String#String#MediaItem#SecurityToken#,404

Before Change


			serviceContext.setAddGuestPermissions(true);
			serviceContext.setScopeGroupId(groupIdLong);

			DLAppLocalServiceUtil.addFileEntry(
				userIdLong, groupIdLong, albumIdLong, fileName,
				mediaItem.getDescription(), StringPool.BLANK, byteArray,
				serviceContext);
		}
		else {
			long mediaItemIdLong = GetterUtil.getLong(mediaItemId);

			FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(
				mediaItemIdLong);

			ServiceContext serviceContext = new ServiceContext();

			serviceContext.setAddCommunityPermissions(true);
			serviceContext.setAddGuestPermissions(true);
			serviceContext.setCreateDate(fileEntry.getCreateDate());
			serviceContext.setModifiedDate(fileEntry.getModifiedDate());
			serviceContext.setScopeGroupId(groupIdLong);

			DLAppLocalServiceUtil.updateFileEntry(
				userIdLong, fileEntry.getFileEntryId(), fileName,

After Change


		serviceContext.setAddGuestPermissions(true);
		serviceContext.setScopeGroupId(groupIdLong);

		Map<String, Serializable> expandoBridgeAttributes =
			new LinkedHashMap<String, Serializable>();

		SerializerUtil.copyProperties(
			mediaItem, expandoBridgeAttributes, _MEDIA_ITEM_FIELDS);

		serviceContext.setExpandoBridgeAttributes(expandoBridgeAttributes);

		ExpandoBridge expandoBridge =
			ExpandoBridgeFactoryUtil.getExpandoBridge(
				user.getCompanyId(), DLFileEntry.class.getName());

		addAttributes(mediaItem, expandoBridge);

		if (mediaItemId == null) {
			long albumIdLong = GetterUtil.getLong(albumId);

			DLAppServiceUtil.addFileEntry(
				groupIdLong, albumIdLong, fileName,
				mediaItem.getDescription(), StringPool.BLANK, byteArray,
				serviceContext);
		}
		else {
			long mediaItemIdLong = GetterUtil.getLong(mediaItemId);